﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="..\Shared.xaml" />
	</ResourceDictionary.MergedDictionaries>

	<Style x:Key="{x:Type Button}" TargetType="{x:Type Button}">
		<Setter Property="OverridesDefaultStyle" Value="True" />
		<Setter Property="FocusVisualStyle" Value="{x:Null}" />
		<Setter Property="FontFamily" Value="Tahoma" />
		<Setter Property="FontSize" Value="11" />
		<Setter Property="VerticalContentAlignment" Value="Center" />
		<Setter Property="HorizontalContentAlignment" Value="Center" />
		<Setter Property="Foreground" Value="{DynamicResource VOColor02}" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<Grid>

						<Border x:Name="Background"
									CornerRadius="1"
									BorderThickness="1"
									BorderBrush="{DynamicResource VOColor11}"
									Background="{DynamicResource VOColor13}"/>

						<Border
								  x:Name="highlight"
								  CornerRadius="1"
								  BorderThickness="1"
								  BorderBrush="{DynamicResource VOColor11}"
								  Background="{DynamicResource VOColor19}"
								  Opacity="0"/>

						<ContentPresenter
									VerticalAlignment="Center"
									Margin="2,2,2,2"
									HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
									Content="{TemplateBinding  Content}"/>

					</Grid>

					<ControlTemplate.Triggers>
						<EventTrigger RoutedEvent="Mouse.MouseEnter">
							<BeginStoryboard>
								<Storyboard>
									<Storyboard.Children>
										<DoubleAnimation To="0.7" Duration="00:00:00.2000000" Storyboard.TargetName="highlight" Storyboard.TargetProperty="Opacity" />
									</Storyboard.Children>
								</Storyboard>
							</BeginStoryboard>
						</EventTrigger>
						<EventTrigger RoutedEvent="Mouse.MouseLeave">
							<BeginStoryboard>
								<Storyboard>
									<Storyboard.Children>
										<DoubleAnimation To="0" Duration="00:00:00.2000000" Storyboard.TargetName="highlight" Storyboard.TargetProperty="Opacity" />
									</Storyboard.Children>
								</Storyboard>
							</BeginStoryboard>
						</EventTrigger>
						<Trigger Property="IsMouseOver" Value="True">
							<Setter Property="Border.Background" TargetName="highlight" Value="{DynamicResource VOColor19}" />
						</Trigger>
						<Trigger Property="IsPressed" Value="true">
							<Setter Property="Border.Background" TargetName="highlight" Value="{DynamicResource VOColor16}" />
						</Trigger>
						<!--Trigger Property="IsEnabled" Value="false">
							<Setter Property="Opacity" Value="0.5" />
						</Trigger-->
						<!--Trigger Property="IsFocused" Value="True">
              <Setter Property="Rectangle.StrokeThickness" TargetName="Border" Value="2" />
            </Trigger-->
						<!--Trigger Property="IsDefault" Value="True">
              <Setter TargetName="Border" Property="StrokeThickness" Value="2" />
            </Trigger-->
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

</ResourceDictionary>